from dingtalkchatbot.chatbot import DingtalkChatbot
from django.conf import settings

def send(message, at_mobiles=[]):
    webhook = settings.DINGTALK_WEB_HOOK
    # 方式一：通常初始化方式
    xiaoding = DingtalkChatbot(webhook)
    # 方式二：勾选加签选项时使用
    # xiaoding = DingtalkChatbot(webhook, secret=settings.DINGTALK_SECRET)
    xiaoding.send_text(msg=('面试通知: %s' % message), at_mobiles=at_mobiles)

